<template>
  <div>
    <!-- 外层容器 -->
    <el-container>
      <!-- 上半区域：顶栏 -->
      <el-header class="layout-header" >
        <img src="../assets/logo.png" width="60px" style="vertical-align:middle">
        <h1 style="display: inline-block">咖啡健康管理平台</h1>
      </el-header>
      <!-- 下半区域 -->
      <el-container class="layout-body">
        <!-- 下半区域的左侧边栏 -->
        <el-aside class="layout-aside">
          <el-menu
              router
              :default-active="$router.currentRoute.path"
              class="el-menu-vertical-demo"
              background-color="#876C43"
              text-color="#fff"
              active-text-color="#fff">
            <!-- 首页 -->
            <el-menu-item index="/sys-admin/index">
              <i class="el-icon-s-home"></i>
              <span>首页</span>
            </el-menu-item>
            <!-- 临时页面 -->
            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-s-tools"></i>
                <span>临时页面</span>
              </template>
              <el-menu-item index="2-1"disabled>
                <i class="el-icon-circle-plus"></i>
                <span>添加管理员</span>
              </el-menu-item>
              <el-menu-item index="2-2"disabled>
                <i class="el-icon-s-operation"></i>
                <span>管理员列表</span>
              </el-menu-item>
              <el-menu-item index="2-3"disabled>
                <i class="el-icon-circle-plus"></i>
                <span>添加品牌</span>
              </el-menu-item>
              <el-menu-item index="2-4"disabled>
                <i class="el-icon-s-operation"></i>
                <span>品牌列表</span>
              </el-menu-item>
              <el-menu-item index="/sys-admin/temp/product/add-new">
                <i class="el-icon-circle-plus"></i>
                <span>添加商品</span>
              </el-menu-item>
              <el-menu-item index="/sys-admin/temp/product/list">
                <i class="el-icon-s-operation"></i>
                <span>商品列表</span>
              </el-menu-item>
              <el-menu-item index="/sys-admin/temp/category/add-new">
                <i class="el-icon-circle-plus"></i>
                <span>添加类别</span>
              </el-menu-item>
              <el-menu-item index="/sys-admin/temp/category/list">
                <i class="el-icon-s-operation"></i>
                <span>类别列表</span>
              </el-menu-item>
            </el-submenu>
            <!-- 商品管理 -->
            <el-submenu index="3">
              <template slot="title">
                <i class="el-icon-s-goods"></i>
                <span>商品管理</span>
              </template>
              <el-menu-item index="3-1"disabled>
                <i class="el-icon-s-operation"></i>
                <span>SPU台账</span>
              </el-menu-item>
              <el-menu-item index="3-2"disabled>
                <i class="el-icon-circle-plus"></i>
                <span>新增SPU</span>
              </el-menu-item>
            </el-submenu>
          </el-menu>
        </el-aside>
        <!-- 下半区域的右侧主体 -->
        <el-main class="layout-main">
          <!-- 根据路由，由其它视图组件来显示 -->
          <router-view/>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<style>
.layout-header {
  background: #000000;
}

.layout-header h1 {
  color: #3D8705;
  line-height: 60px;
}

.layout-body {
  position: absolute;
  left: 0px;
  right: 0px;
  top: 60px;
  bottom: 0px;
}

.layout-aside {
  background: white;
}

.layout-aside i {
  color: #fff !important;
}

.layout-main {
}

.el-menu-item.is-active {
  background: #3D8705 !important;
}
</style>

<script>

</script>
